<?php if (empty($data['list']) || count($data['list']) == 0) { ?>
<div style="text-align:center; padding-top:20px;"><?php __('no result found'); ?></div>
<?php } else { ?>
<table width="100%" cellpadding="2" cellspacing="0" border="0" class="reportTbl">
  <thead>
    <tr>
      <td><?php __('Week'); ?></td>
      <td><?php __('Starting Date'); ?></td>
      <td><?php __('Ending Date'); ?></td>
      <td><?php __('Sponsor Bonus'); ?></td>
      <td><?php __('Over Bonus'); ?></td>
      <td><?php __('Cycle Bonus'); ?></td>
      <td><?php __('Global Bonus'); ?></td>
      <td><?php __('Coupon'); ?></td>
      <td><?php __('Total Bonus Payable'); ?></td>
      <td><?php __('Payment Date'); ?></td>
    </tr>
  </thead>
  <tbody>
<?php     foreach ($data['list'] as $i=>$row) {
              $no    = $i+1;
              $style = ($i%2==0)?'':' style="background-color: #E3E3E3;"'; ?>
    <tr>
      <td align="right"<?php e($style); ?>><?php e($row['week']); ?></td>
      <td align="center"><?php e($row['start']); ?></td>
      <td align="center"><?php e($row['end']); ?></td>
      <td align="right"><?php e($row['sponsor']); ?></td>
      <td align="right"><?php e($row['over']); ?></td>
      <td align="right"><?php e($row['cycle']); ?></td>
      <td align="right"><?php e($row['global']); ?></td>
      <td align="right"><?php e($row['coupon']); ?></td>
      <td align="right"><?php e(number_format($row['total'],2)); ?></td>
      <td align="center"><?php e($row['payment']); ?></td>
    </tr>
<?php } ?>
  </tbody>
  <tfoot>
    <tr>
      <td align="right" colspan="3" style="font-weight:bold;"><?php __('Total'); ?>: </td>
      <td align="right" class="total"><?php e(number_format($data['total_1'],2)); ?></td>
      <td align="right" class="total"><?php e(number_format($data['total_2'],2)); ?></td>
      <td align="right" class="total"><?php e(number_format($data['total_3'],2)); ?></td>
      <td align="right" class="total"><?php e(number_format($data['total_4'],2)); ?></td>
      <td align="right" class="total"><?php e(number_format($data['total_5'],2)); ?></td>
      <td align="right" class="total"><?php e(number_format($data['total_6'],2)); ?></td>
      <td>&nbsp;</td>
    </tr>
  </tfoot>
</table>
<?php } ?>